﻿using System.Collections.Generic;
using System.ComponentModel;

namespace StartupSolution.ViewModel
{
    public class Customer : BaseViewModel
    {
        public Customer()
        {
        }

        private string customerID;
        public string CustomerID
        {
            get
            {
                return this.customerID;
            }
            set
            {
                if (this.customerID != value)
                {
                    this.customerID = value;
                    this.OnPropertyChanged("CustomerID");
                }
            }
        }

        private string company;
        public string Company
        {
            get
            {
                return this.company;
            }
            set
            {
                if (this.company != value)
                {
                    this.company = value;
                    this.OnPropertyChanged("Company");
                }
            }
        }

        private string contactName;
        public string ContactName
        {
            get
            {
                return this.contactName;
            }
            set
            {
                if (this.contactName != value)
                {
                    this.contactName = value;
                    this.OnPropertyChanged("ContactName");
                }
            }
        }

        private string contactTitle;
        public string ContactTitle
        {
            get
            {
                return this.contactTitle;
            }
            set
            {
                if (this.contactTitle != value)
                {
                    this.contactTitle = value;
                    this.OnPropertyChanged("ContactTitle");
                }
            }
        }

        private string contactEmail;
        public string ContactEmail
        {
            get
            {
                return this.contactEmail;
            }
            set
            {
                if (this.contactEmail != value)
                {
                    this.contactEmail = value;
                    this.OnPropertyChanged("ContactEmail");
                }
            }
        }

        private string addressOne;
        public string AddressOne
        {
            get
            {
                return this.addressOne;
            }
            set
            {
                if (this.addressOne != value)
                {
                    this.addressOne = value;
                    this.OnPropertyChanged("AddressOne");
                }
            }
        }

        private string addressTwo;
        public string AddressTwo
        {
            get
            {
                return this.addressTwo;
            }
            set
            {
                if (this.addressTwo != value)
                {
                    this.addressTwo = value;
                    this.OnPropertyChanged("AddressTwo");
                }
            }
        }

        private string city;
        public string City
        {
            get
            {
                return this.city;
            }
            set
            {
                if (this.city != value)
                {
                    this.city = value;
                    this.OnPropertyChanged("City");
                }
            }
        }

        private string region;
        public string Region
        {
            get
            {
                return this.region;
            }
            set
            {
                if (this.region != value)
                {
                    this.region = value;
                    this.OnPropertyChanged("Region");
                }
            }
        }

        public string FormatedCityState
        {
            get
            {
                return this.city + ", " + this.region + " " + this.postalCode;
            }
        }


        private string country;
        public string Country
        {
            get
            {
                return this.country;
            }
            set
            {
                if (this.country != value)
                {
                    this.country = value;
                    this.OnPropertyChanged("Country");
                }
            }
        }

        private string postalCode;
        public string PostalCode
        {
            get
            {
                return this.postalCode;
            }
            set
            {
                if (this.postalCode != value)
                {
                    this.postalCode = value;
                    this.OnPropertyChanged("PostalCode");
                }
            }
        }

        private string phone;
        public string Phone
        {
            get
            {
                return this.phone;
            }
            set
            {
                if (this.phone != value)
                {
                    this.phone = value;
                    this.OnPropertyChanged("Phone");
                }
            }
        }


        private string fax;
        public string Fax
        {
            get
            {
                return this.fax;
            }
            set
            {
                if (this.fax != value)
                {
                    this.fax = value;
                    this.OnPropertyChanged("Fax");
                }
            }
        }

        private IEnumerable<Order> orders;
        public IEnumerable<Order> Orders
        {
            get
            {
                return this.orders;
            }
            set
            {
                if (this.orders != value)
                {
                    this.orders = value;
                    this.OnPropertyChanged("Orders");
                }
            }
        }
    }
}
